export const list = (ctx) => {
  return [
    {
      type: 'drawWebImg',
      option: {
        url: ctx.bgImg,
        x: 0,
        y: 0,
        width: ctx.cansWidth,
        height: ctx.cansHeight
      }
    },
    {
      type: 'drawWebImg',
      option: {
        url: ctx.avatar,
        x: (27 * ctx.cansWidth) / 375,
        y: (36 * ctx.cansWidth) / 375,
        width: (ctx.avatarImgWidth * ctx.cansWidth) / 375,
        height: (ctx.avatarImgHeight * ctx.cansWidth) / 375
      }
    },
    {
      type: 'drawText',
      option: {
        text: ctx.date,
        x: (87 * ctx.cansWidth) / 375,
        y: (69 * ctx.cansWidth) / 375,
        color: '#FFFFFF',
        size: 10,
        bold: false
      }
    },
    {
      type: 'drawText',
      option: {
        text: ctx.nickName,
        x: (87 * ctx.cansWidth) / 375,
        y: (46 * ctx.cansWidth) / 375,
        color: '#FFFFFF',
        size: 15,
        bold: true
      }
    },
    {
      type: 'drawWebImg',
      option: {
        url: ctx.projectImg,
        x: (37 * ctx.cansWidth) / 375,
        y: (167 * ctx.cansWidth) / 375,
        width: (ctx.projectImgWidth * ctx.cansWidth) / 375,
        height: (ctx.projectImgHeight * ctx.cansWidth) / 375,
        aspectFit: true
      }
    },
    {
      type: 'drawText',
      option: {
        text: ctx.name,
        x: (44 * ctx.cansWidth) / 375,
        y: (539 * ctx.cansWidth) / 375 + 30,
        color: '#333333',
        size: 15,
        bold: true
      }
    },
    {
      type: 'changeRow',
      option: {
        text: ctx.describe,
        x: (44 * ctx.cansWidth) / 375,
        y: (571 * ctx.cansWidth) / 375 + 30,
        color: '#888888',
        size: 13,
        maxWidth: (302 * ctx.cansWidth) / 375
      }
    },
    {
      type: 'drawText',
      option: {
        text: '￥',
        x: (44 * ctx.cansWidth) / 375,
        y: (623 * ctx.cansWidth) / 375 + 30,
        color: '#FFB415',
        size: 19,
        bold: true
      }
    },
    {
      type: 'drawText',
      option: {
        text: ctx.price,
        x: (63 * ctx.cansWidth) / 375,
        y: (623 * ctx.cansWidth) / 375 + 30,
        color: '#FFB415',
        size: 32,
        bold: true
      }
    },
    {
      type: 'drawWebImg',
      option: {
        url: ctx.qrUrl,
        x: (243 * ctx.cansWidth) / 375,
        y: (602 * ctx.cansWidth) / 375,
        width: ctx.qrImgWidth,
        height: ctx.qrImgHeight,
        noCache: true
      }
    }
  ]
}

export const list2 = (ctx) => {
  return [
    {
      type: 'drawWebImg',
      option: {
        url: ctx.projectImg,
        x: 0,
        y: 0,
        width: ctx.cansWidth,
        height: (707 * ctx.cansWidth) / 375,
        aspectFit: true
      }
    },
    {
      type: 'drawWebImg',
      option: {
        url: 'https://public-oss-file.zmaxfilm.com/applet/img/my/bottomBg-poster.png',
        x: 0,
        y: (678 * ctx.cansWidth) / 375,
        width: ctx.cansWidth,
        height: 132
      }
    },
    {
      type: 'drawWebImg',
      option: {
        url: ctx.avatar,
        x: (22 * ctx.cansWidth) / 375,
        y: (678 * ctx.cansWidth) / 375 + 45,
        width: ctx.avatarImgWidth,
        height: ctx.avatarImgHeight
      }
    },
    {
      type: 'drawText',
      option: {
        text: ctx.nickName,
        x: (81 * ctx.cansWidth) / 375,
        y: (678 * ctx.cansWidth) / 375 + 50,
        color: '#000000',
        size: 15,
        bold: true
      }
    },
    {
      type: 'drawText',
      option: {
        text: ctx.date,
        x: (81 * ctx.cansWidth) / 375,
        y: (678 * ctx.cansWidth) / 375 + 70,
        color: '#000000',
        size: 10,
        bold: false
      }
    },
    {
      type: 'drawWebImg',
      option: {
        url: ctx.qrUrl,
        // #ifdef H5
        x: (261 * ctx.cansWidth) / 375,
        y: (678 * ctx.cansWidth) / 375 + 28,
        // #endif
        // #ifdef MP-WEIXIN
        x: (259 * ctx.cansWidth) / 375,
        y: (678 * ctx.cansWidth) / 375 + 25,
        // #endif
        width: ctx.qrImgWidth,
        height: ctx.qrImgHeight,
        noCache: true
      }
    }
  ]
}
